﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Events;

namespace com.tdb.foundation
{
    public abstract class BaseView : MonoBehaviour
    {

        public virtual void OnEnter(BaseContext context, UnityAction callback)
        {
            callback.SafeInvoke();
        }

        public virtual void OnExit(UnityAction callback)
        {
            callback.SafeInvoke();
        }

        public virtual void OnPause()
        {
        }

        public virtual void OnResume()
        {
        }

        public void DestroySelf()
        {
            Destroy(gameObject);
        }
    }

}

